VERSION 5.00
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "crystl32.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmORD250 
   BackColor       =   &H00800000&
   Caption         =   "PUR500"
   ClientHeight    =   8595
   ClientLeft      =   270
   ClientTop       =   30
   ClientWidth     =   11505
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   8595
   ScaleWidth      =   11505
   Begin Crystal.CrystalReport CrystalReport1 
      Left            =   8385
      Top             =   8115
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   348160
      PrintFileLinesPerPage=   60
   End
   Begin VB.CheckBox chkELBOD 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Back Order"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800080&
      Height          =   300
      Left            =   3180
      TabIndex        =   82
      Top             =   3420
      Width           =   1455
   End
   Begin VB.TextBox txtELBOQ 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   2235
      TabIndex        =   81
      Top             =   15
      Visible         =   0   'False
      Width           =   990
   End
   Begin VB.TextBox txtELBOW 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   6570
      TabIndex        =   80
      Top             =   -15
      Visible         =   0   'False
      Width           =   825
   End
   Begin VB.TextBox txtELPSQ 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   3180
      TabIndex        =   79
      Top             =   3930
      Width           =   990
   End
   Begin VB.TextBox txtELPSW 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   7515
      TabIndex        =   78
      Top             =   3900
      Width           =   825
   End
   Begin VB.TextBox txtEHAMT 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   10155
      Locked          =   -1  'True
      TabIndex        =   67
      Top             =   7695
      Width           =   1170
   End
   Begin VB.TextBox txtEHVAM 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   7785
      Locked          =   -1  'True
      TabIndex        =   66
      Top             =   7695
      Width           =   960
   End
   Begin VB.TextBox txtEHBVA 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   1500
      Locked          =   -1  'True
      TabIndex        =   65
      Top             =   7665
      Width           =   960
   End
   Begin VB.TextBox txtEHBCA 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   4065
      Locked          =   -1  'True
      TabIndex        =   64
      Top             =   7680
      Width           =   1170
   End
   Begin VB.Frame FrameECLine 
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   0  'None
      Caption         =   "Frame1"
      Height          =   1800
      Left            =   135
      TabIndex        =   39
      Top             =   3315
      Width           =   11145
      Begin VB.TextBox txtELVAT 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   9375
         TabIndex        =   74
         Top             =   1065
         Width           =   855
      End
      Begin MSDataListLib.DataCombo cboELITN 
         Bindings        =   "frmORD250.frx":0000
         Height          =   315
         Left            =   6180
         TabIndex        =   63
         Top             =   90
         Visible         =   0   'False
         Width           =   4005
         _ExtentX        =   7064
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "IMITD"
         BoundColumn     =   "IMITN"
         Text            =   ""
      End
      Begin VB.ComboBox cboELSTT 
         ForeColor       =   &H000000FF&
         Height          =   315
         ItemData        =   "frmORD250.frx":0015
         Left            =   9390
         List            =   "frmORD250.frx":002E
         TabIndex        =   52
         Top             =   1425
         Width           =   1500
      End
      Begin VB.TextBox txtELAMT 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6195
         TabIndex        =   51
         Top             =   1470
         Width           =   915
      End
      Begin VB.TextBox txtELBCA 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1890
         TabIndex        =   50
         Top             =   1470
         Width           =   915
      End
      Begin VB.ComboBox cboELPER 
         Height          =   315
         ItemData        =   "frmORD250.frx":0081
         Left            =   6195
         List            =   "frmORD250.frx":008E
         TabIndex        =   49
         Top             =   1035
         Width           =   1230
      End
      Begin VB.TextBox txtELPRC 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1905
         TabIndex        =   48
         Top             =   1035
         Width           =   915
      End
      Begin VB.TextBox txtELWGT 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6195
         TabIndex        =   47
         Top             =   570
         Width           =   915
      End
      Begin VB.TextBox txtELQTY 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1905
         TabIndex        =   46
         Top             =   570
         Width           =   915
      End
      Begin VB.TextBox txtELITN 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6210
         TabIndex        =   45
         Top             =   105
         Width           =   1425
      End
      Begin VB.TextBox txtELITD 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7665
         Locked          =   -1  'True
         TabIndex        =   44
         Top             =   90
         Width           =   2550
      End
      Begin VB.TextBox txtELOLN 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1905
         Locked          =   -1  'True
         TabIndex        =   43
         Top             =   75
         Width           =   525
      End
      Begin VB.TextBox txtELPDC 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   9375
         TabIndex        =   42
         Top             =   585
         Width           =   825
      End
      Begin VB.TextBox txtELBVA 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   3105
         TabIndex        =   41
         Top             =   1470
         Width           =   960
      End
      Begin VB.TextBox txtELVAM 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7425
         TabIndex        =   40
         Top             =   1455
         Width           =   825
      End
      Begin VB.Line Line5 
         X1              =   7320
         X2              =   7200
         Y1              =   600
         Y2              =   810
      End
      Begin VB.Line Line4 
         X1              =   3000
         X2              =   2880
         Y1              =   600
         Y2              =   825
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "VAT %"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   26
         Left            =   8670
         TabIndex        =   75
         Top             =   1095
         Width           =   615
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Line status"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   240
         Index           =   23
         Left            =   8310
         TabIndex        =   62
         Top             =   1470
         Width           =   975
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Base currency/VAT"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   22
         Left            =   45
         TabIndex        =   61
         Top             =   1515
         Width           =   1845
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Line amount/VAT"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   21
         Left            =   4530
         TabIndex        =   60
         Top             =   1515
         Width           =   1620
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Price Per"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   20
         Left            =   5265
         TabIndex        =   59
         Top             =   1095
         Width           =   855
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Unit price"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   19
         Left            =   975
         TabIndex        =   58
         Top             =   1080
         Width           =   870
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Weight Cust. Order / Picked slip"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   405
         Index           =   18
         Left            =   4410
         TabIndex        =   57
         Top             =   510
         Width           =   1665
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Quantity Cust. Order / Picked slip"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   390
         Index           =   17
         Left            =   60
         TabIndex        =   56
         Top             =   540
         Width           =   1785
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Item No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   16
         Left            =   5325
         TabIndex        =   55
         Top             =   105
         Width           =   750
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Invoice lines"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   15
         Left            =   720
         TabIndex        =   54
         Top             =   135
         Width           =   1140
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Discount %"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   24
         Left            =   8250
         TabIndex        =   53
         Top             =   630
         Width           =   1065
      End
      Begin VB.Line Line2 
         X1              =   3000
         X2              =   2880
         Y1              =   1500
         Y2              =   1725
      End
      Begin VB.Line Line3 
         X1              =   7320
         X2              =   7200
         Y1              =   1500
         Y2              =   1710
      End
   End
   Begin MSAdodcLib.Adodc Adodc7 
      Height          =   375
      Left            =   5130
      Top             =   90
      Visible         =   0   'False
      Width           =   1740
      _ExtentX        =   3069
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "7 SMM"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc6 
      Height          =   330
      Left            =   9390
      Top             =   435
      Visible         =   0   'False
      Width           =   1830
      _ExtentX        =   3228
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "6 ECH"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton cmdPrintConfirmed 
      Caption         =   "&Order Print Confirmed"
      Height          =   456
      Left            =   3900
      TabIndex        =   22
      Top             =   8055
      Width           =   1170
   End
   Begin VB.Frame FrameBB 
      BackColor       =   &H00800000&
      BorderStyle     =   0  'None
      Caption         =   "Frame2"
      Height          =   2535
      Left            =   75
      TabIndex        =   6
      Top             =   705
      Width           =   11400
      Begin VB.TextBox txtEHPTC 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   10020
         TabIndex        =   76
         Top             =   1770
         Width           =   1170
      End
      Begin MSDataListLib.DataCombo cboEHCCD 
         Bindings        =   "frmORD250.frx":00AF
         Height          =   315
         Left            =   6420
         TabIndex        =   38
         Top             =   2130
         Visible         =   0   'False
         Width           =   1470
         _ExtentX        =   2593
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "CMCCD"
         BoundColumn     =   "CMCCD"
         Text            =   ""
      End
      Begin VB.TextBox txtEHCCD 
         Height          =   315
         Left            =   6420
         TabIndex        =   37
         Top             =   2130
         Width           =   1170
      End
      Begin MSDataListLib.DataCombo cboEHSNO 
         Bindings        =   "frmORD250.frx":00C4
         Height          =   315
         Left            =   6420
         TabIndex        =   36
         Top             =   885
         Visible         =   0   'False
         Width           =   3090
         _ExtentX        =   5450
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "MMNME"
         BoundColumn     =   "MMSNO"
         Text            =   ""
      End
      Begin VB.TextBox txtMMNME 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7335
         TabIndex        =   35
         Top             =   900
         Width           =   2160
      End
      Begin VB.TextBox txtEHCPO 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6405
         TabIndex        =   34
         Top             =   1740
         Width           =   1170
      End
      Begin VB.TextBox txtEHNOL 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1665
         TabIndex        =   33
         Top             =   2160
         Width           =   480
      End
      Begin VB.TextBox txtEHSNO 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6420
         TabIndex        =   32
         Top             =   900
         Width           =   885
      End
      Begin VB.TextBox txtEHDUE 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1680
         TabIndex        =   31
         Top             =   1770
         Width           =   1215
      End
      Begin VB.TextBox txtEHSTA 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6420
         TabIndex        =   30
         Top             =   1335
         Width           =   3105
      End
      Begin VB.TextBox txtEHSTN 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1680
         TabIndex        =   29
         Top             =   1335
         Width           =   1215
      End
      Begin MSDataListLib.DataCombo cboEHCNO 
         Bindings        =   "frmORD250.frx":00D9
         Height          =   315
         Left            =   1680
         TabIndex        =   21
         Top             =   900
         Visible         =   0   'False
         Width           =   3075
         _ExtentX        =   5424
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "CMNME"
         BoundColumn     =   "CMCNO"
         Text            =   ""
      End
      Begin VB.TextBox txtEHODN 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1680
         TabIndex        =   13
         Top             =   540
         Width           =   1215
      End
      Begin VB.TextBox txtEHDTE 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   6435
         TabIndex        =   12
         Top             =   510
         Width           =   1170
      End
      Begin VB.TextBox txtEHCNO 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1680
         TabIndex        =   11
         Top             =   900
         Width           =   750
      End
      Begin VB.TextBox txtEHCER 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   10035
         TabIndex        =   10
         Top             =   2115
         Width           =   1155
      End
      Begin VB.TextBox txtCMNME 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   2490
         TabIndex        =   9
         Top             =   900
         Width           =   2235
      End
      Begin VB.ComboBox cboEHSTT 
         ForeColor       =   &H000000FF&
         Height          =   315
         ItemData        =   "frmORD250.frx":00EE
         Left            =   9930
         List            =   "frmORD250.frx":0107
         TabIndex        =   8
         Top             =   60
         Width           =   1350
      End
      Begin VB.ComboBox cboEHITP 
         Height          =   315
         ItemData        =   "frmORD250.frx":015A
         Left            =   4920
         List            =   "frmORD250.frx":0164
         TabIndex        =   7
         Top             =   30
         Width           =   1365
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Term code"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   28
         Left            =   8610
         TabIndex        =   77
         Top             =   1800
         Width           =   1320
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Number Of line"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   29
         Left            =   300
         TabIndex        =   28
         Top             =   2175
         Width           =   1320
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Customer PO No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   27
         Left            =   4860
         TabIndex        =   27
         Top             =   1830
         Width           =   1470
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Payment due date"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   25
         Left            =   15
         TabIndex        =   26
         Top             =   1785
         Width           =   1590
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Saleman No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   10
         Left            =   5220
         TabIndex        =   25
         Top             =   960
         Width           =   1110
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Ship to Address"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   8
         Left            =   4905
         TabIndex        =   24
         Top             =   1380
         Width           =   1425
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Ship to No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   6
         Left            =   675
         TabIndex        =   23
         Top             =   1380
         Width           =   900
      End
      Begin VB.Line Line1 
         X1              =   2160
         X2              =   5340
         Y1              =   5280
         Y2              =   4455
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Order No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   2
         Left            =   780
         TabIndex        =   20
         Top             =   555
         Width           =   840
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Customer Order Date"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   3
         Left            =   4470
         TabIndex        =   19
         Top             =   540
         Width           =   1920
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Order Type"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0080FFFF&
         Height          =   255
         Index           =   4
         Left            =   3480
         TabIndex        =   18
         Top             =   105
         Width           =   1305
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Customer No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   5
         Left            =   495
         TabIndex        =   17
         Top             =   975
         Width           =   1110
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Currency Code"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   7
         Left            =   5010
         TabIndex        =   16
         Top             =   2190
         Width           =   1320
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Exchange Rate"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00E0E0E0&
         Height          =   255
         Index           =   9
         Left            =   8610
         TabIndex        =   15
         Top             =   2145
         Width           =   1320
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Invoice status"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   255
         Index           =   13
         Left            =   8430
         TabIndex        =   14
         Top             =   120
         Width           =   1380
      End
   End
   Begin MSAdodcLib.Adodc Adodc5 
      Height          =   375
      Left            =   9330
      Top             =   75
      Visible         =   0   'False
      Width           =   1605
      _ExtentX        =   2831
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "5 CUR_EX"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc4 
      Height          =   360
      Left            =   8190
      Top             =   390
      Visible         =   0   'False
      Width           =   1755
      _ExtentX        =   3096
      _ExtentY        =   635
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "4 INVOICE"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   345
      Left            =   8190
      Top             =   75
      Visible         =   0   'False
      Width           =   1725
      _ExtentX        =   3043
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "3 IIM"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   6870
      Top             =   420
      Visible         =   0   'False
      Width           =   1920
      _ExtentX        =   3387
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "2. AVM"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   6885
      Top             =   90
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "1 RCM"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton cmdConfirmed 
      Caption         =   "Order line Confirmed"
      Height          =   456
      Left            =   2655
      TabIndex        =   5
      Top             =   8055
      Width           =   1200
   End
   Begin VB.CommandButton cmdPickedSlip 
      Caption         =   "Order line Picked Slip"
      Height          =   450
      Left            =   1350
      TabIndex        =   4
      Top             =   8070
      Width           =   1260
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "&Exit"
      Height          =   465
      Left            =   5130
      TabIndex        =   3
      Top             =   8055
      Width           =   1065
   End
   Begin VB.CommandButton cmdReview 
      Caption         =   "&Review Order"
      Height          =   432
      Left            =   225
      TabIndex        =   2
      Top             =   8070
      Width           =   1092
   End
   Begin MSDataGridLib.DataGrid grdECL 
      Bindings        =   "frmORD250.frx":0187
      Height          =   2220
      Left            =   150
      TabIndex        =   68
      Top             =   5430
      Width           =   11190
      _ExtentX        =   19738
      _ExtentY        =   3916
      _Version        =   393216
      BackColor       =   -2147483624
      ForeColor       =   8388608
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   11
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   "ELOLN"
         Caption         =   "line"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "ELITN"
         Caption         =   "Item"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "ELITD"
         Caption         =   "Item Description"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "ELQTY"
         Caption         =   "Quantity"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "ELWGT"
         Caption         =   "Weight"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "ELPRC"
         Caption         =   "Unit price"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "ELPER"
         Caption         =   "Price per"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08 
         DataField       =   "ELAMT"
         Caption         =   "Line amount"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column09 
         DataField       =   "ELBCA"
         Caption         =   "Base Cur Amount"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column10 
         DataField       =   "ELSTT"
         Caption         =   "Status"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   14.74
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   329.953
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1184.882
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   2670.236
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1035.213
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   1349.858
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   959.811
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   1110.047
         EndProperty
      EndProperty
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Invoice lines"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   14
      Left            =   30
      TabIndex        =   73
      Top             =   5160
      Width           =   1200
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Total amount"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   12
      Left            =   2790
      TabIndex        =   72
      Top             =   7710
      Width           =   1215
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "VAT amount"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   11
      Left            =   270
      TabIndex        =   71
      Top             =   7695
      Width           =   1095
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "VAT amount"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   30
      Left            =   6570
      TabIndex        =   70
      Top             =   7725
      Width           =   1095
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Total amount"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   31
      Left            =   8970
      TabIndex        =   69
      Top             =   7725
      Width           =   1215
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Customer Order Entry"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   16.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   540
      Index           =   1
      Left            =   2535
      TabIndex        =   1
      Top             =   240
      Width           =   4470
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "ORD500"
      BeginProperty Font 
         Name            =   "VNI-Present"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   450
      Index           =   0
      Left            =   75
      TabIndex        =   0
      Top             =   -45
      Width           =   1830
   End
End
Attribute VB_Name = "frmORD250"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim INVType(3), StaOrd(7), Per(3), OldEHODN As String, NewTrans As Byte, OldCurRate As Double

Private Sub cboEHCCD_Click(Area As Integer)
If Area = 2 Then
    txtEHCCD = cboEHCCD.Text
    cboEHCCD.Visible = False
    Dim RecCCI As Recordset
    Set RecCCI = DBconn.Execute("Select * from CCI where CICCD='" & txtEHCCD & "' order by CIDTE DESC")
    If Not RecCCI.EOF Then
        txtEHCER = RecCCI!CICCR
    Else
        txtEHCER = 0
    End If
End If
End Sub

Private Sub cboEHCNO_Click(Area As Integer)
If Area = 2 Then
    txtEHCNO = cboEHCNO.BoundText
    txtCMNME = cboEHCNO.Text
    cboEHCNO.Visible = False
    txtEHSNO.SetFocus
End If
End Sub


Private Sub cboEHITP_Click()
    txtEHODN.SetFocus
End Sub

Private Sub cboEHSNO_Click(Area As Integer)
If Area = 2 Then
    txtEHSNO = cboEHSNO.BoundText
    txtMMNME = cboEHSNO.Text
    cboEHSNO.Visible = False
    txtEHSTN.SetFocus
End If
End Sub

Private Sub cboEHSTT_Click()
'MsgBox Left(cboEHSTT.List(cboEHSTT.ListIndex), 1)
End Sub

Private Sub cboELITN_Click(Area As Integer)
If Area = 2 Then
    txtELITN = cboELITN.BoundText
    txtELITD = cboELITN.Text
    cboELITN.Visible = False
    txtELQTY.SetFocus
End If
End Sub

Private Sub cboELPER_Click()
Dim DiscAMT, DiscBAM
txtELVAT = VATRate(txtEHCNO, txtELITN)

Select Case cboELPER.ListIndex + 1
    Case 1
        txtELBVA = Val(txtELQTY) * Val(txtELPRC) * Val(txtELVAT)
        txtELBCA = (Val(txtELQTY) * Val(txtELPRC)) + Val(txtELBVA)
        DiscBAM = Val(txtELBCA) * Val(txtELPDC) / 100
        txtELBCA = Val(txtELBCA) - Val(DiscBAM)
        
        txtELVAM = Val(txtELQTY) * Val(txtELPRC) * Val(txtEHCER) * Val(txtELVAT)
        txtELAMT = Val(txtELQTY) * Val(txtELPRC) * Val(txtEHCER) + Val(txtELVAM)
        DiscAMT = Val(txtELAMT) * Val(DiscAMT) / 100
        txtELAMT = Val(txtELAMT) - Val(DiscAMT)
    Case 2
        txtELBVA = Val(txtELWGT) * Val(txtELPRC) * Val(txtELVAT)
        txtELBCA = (Val(txtELWGT) * Val(txtELPRC)) + Val(txtELBVA)
        DiscBAM = Val(txtELBCA) * Val(txtELPDC) / 100
        txtELBCA = Val(txtELBCA) - Val(DiscBAM)
        
        txtELVAM = Val(txtELWGT) * Val(txtELPRC) * Val(txtEHCER) * Val(txtELVAT)
        txtELAMT = Val(txtELWGT) * Val(txtELPRC) * Val(txtEHCER) + Val(txtELVAM)
        DiscAMT = Val(txtELAMT) * Val(DiscAMT) / 100
        txtELAMT = Val(txtELAMT) - Val(DiscAMT)
End Select
txtELPDC.SetFocus
End Sub

Private Sub cmdConfirmed_Click()
Dim txtELBOD As String
txtELBOQ = Val(txtELQTY) - Val(txtELPSQ)
txtELBOW = Val(txtELWGT) - Val(txtELPSW)
txtELBOD = IIf(chkELBOD.value = 1, "Y", "")
SQL = "Update  ECL set ELPSQ=" & txtELPSQ & ",ELPSW=" & txtELPSW & ",ELSTT='3' where ELODN='" & txtEHODN & "' " & _
" AND ELOLN=" & txtELOLN
DBconn.Execute SQL
WriteToIIM txtELITN, -Val(txtELBOW), -Val(txtELBOQ)
If chkELBOD.value = 1 And Val(txtELBOQ) > 0 Then 'Back Order
    SQL = "Update ECL set ELQTY=" & txtELPSQ & _
        ",ELWGT=" & txtELPSW & ",ELSTT='3',ELBOD='" & txtELBOD & "'" & _
        " where ELODN='" & txtEHODN & "' AND ELOLN=" & txtELOLN
        'MsgBox SQL
    DBconn.Execute SQL

    Set recECL = DBconn.Execute("Select * from ECL where ELODN='" & txtEHODN & "' order by ELOLN Desc ")
    If recECL.EOF Then
        txtELOLN = 1
    Else
        txtELOLN = recECL!ELOLN + 1
    End If
    SQL = "Insert into ECL(ELODN,ELITN,ELITD,ELLUS" & _
    ",ELPER,ELOLN,ELSTT " & _
    ",ELQTY,ELWGT,ELPRC,ELPDC" & _
    ",ELAMT,ELVAM,ELBCA,ELBVA,ELVAT) values " & _
    "('" & txtEHODN & "','" & txtELITN & "','" & txtELITD & "','" & UserLogin & "'" & _
    ",'" & cboELPER.ListIndex + 1 & "','" & txtELOLN & "','4'" & _
    "," & txtELBOQ & "," & txtELBOW & "," & txtELPRC & "," & txtELPDC & _
    "," & txtELAMT & "," & txtELVAM & "," & txtELBCA & "," & txtELBVA & "," & txtELVAT & ")"
    
    'MsgBox SQL
    DBconn.Execute (SQL)
    WriteToIIM txtELITN, Val(txtELBOW), Val(txtELBOQ)
End If
End Sub

Private Sub cmdExit_Click()
Unload frmORD250
End Sub

Private Sub cmdPickedSlip_Click()
SQL = "Update  ECL set ELPSQ=" & txtELPSQ & ",ELPSW=" & txtELPSW & ",ELSTT='2' where ELODN='" & txtEHODN & "' " & _
" AND ELOLN=" & txtELOLN

DBconn.Execute SQL
CrystalReport1.ReportFileName = DDAN & "\ORD250.rpt"
CrystalReport1.RetrieveStoredProcParams
CrystalReport1.StoredProcParam(0) = txtEHODN
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1
End Sub

Private Sub cmdReview_Click()
frmReview.Tag = "ORD500"
frmReview.Show 1
ISEDITING = False
ISADDING = False
If frmReview.Tag <> "" Then
    txtEHODN = frmReview.Tag
    txtELOLN = 1
    WriteToScreen
End If
End Sub
Sub WriteToScreen()

Dim recECL As Recordset

Set recECL = DBconn.Execute("select ECH.* from ECH where ECH.EHODN='" & txtEHODN & "'")
If Not recECL.EOF Then
    With recECL
        cboEHITP = INVType(!EHITP)
        txtEHNOL = IIf(IsNull(!EHNOL), 0, !EHNOL)
        txtEHODN = !EHODN
        OldEHODN = txtEHODN
        txtEHDTE = !EHDTE
        txtEHCNO = !EHCNO
        txtEHSTN = !EHSTN
        txtEHSTA = !EHSTA
        txtCMNME = Find("RCM", "CMNME", " WHERE CMCNO='" & txtEHCNO & "'")
        txtEHCPO = IIf(IsNull(!EHCPO), 0, !EHCPO)
        txtEHPTC = IIf(IsNull(!EHPTC), "", !EHPTC)
        cboEHSTT = StaOrd(!EHSTT)
        cboEHCCD = !EHCCD
        txtEHCER = !EHCER
        OldCurRate = txtEHCER
        txtEHCCD = !EHCCD
        txtEHSNO = !EHSNO
        txtMMNME = Find("SMM", "MMNME", " WHERE MMSNO='" & txtEHSNO & "'")
        txtEHDUE = !EHDUE
        .Close
    End With
End If

If txtELOLN <> "" Then
    Set recECL = DBconn.Execute("select ECL.* from ECL where ECL.ELODN='" & txtEHODN & "' and ELOLN='" & txtELOLN & "'")
    If Not recECL.EOF Then
        With recECL
            txtELITN = !ELITN
            txtELITD = !ELITD
            txtELOLN = !ELOLN
            txtELQTY = !ELQTY
            txtELPSQ = IIf(IsNull(!ELPSQ), 0, !ELPSQ)
            txtELWGT = !ELWGT
            txtELPSW = IIf(IsNull(!ELPSW), 0, !ELPSW)
            txtELPRC = !ELPRC
            cboELPER = Per(!ELPER)
            txtELPDC = !ELPDC
            txtELAMT = !ELAMT ' Line amount
            txtELVAM = !ELVAM ' VAT line (VND)
            txtELBCA = !ELBCA ' Base currency line amount
            txtELBVA = !ELBVA ' VAT base currency
            txtELVAT = !ELVAT
            cboELSTT = StaOrd(!ELSTT)
            cboELSTT.ListIndex = Val(!ELSTT) - 1
            .Close
        End With
     End If
End If

Adodc4.RecordSource = "Select ECL.*,ECH.* from ECL " & _
    " LEFT JOIN ECH ON ECL.ELODN=ECH.EHODN where ECH.EHODN ='" & txtEHODN & "' ORDER BY ELOLN"
Adodc4.Refresh

End Sub

Private Sub Command1_Click()

End Sub

Private Sub Form_Load()
NewTrans = False
ISEDITING = False
ISADDING = False
OpenFile
ButtonStatus
End Sub

Private Sub grdECL_DblClick()
    txtELOLN = grdECL.Columns(1).value
    WriteToScreen
End Sub

Private Sub txtEHCCD_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Dim Result As String
    Result = Find("CCM", "CMCCD", "WHERE CMCCD='" & txtEHCCD & "'")
    If Result <> "" Then
        Dim RecCCI As Recordset
        Set RecCCI = DBconn.Execute("Select * from CCI where CICCD='" & txtEHCCD & "' order by CIDTE DESC")
        If Not RecCCI.EOF Then
            txtEHCER = RecCCI!CICCR
        Else
            txtEHCER = 0
        End If
        txtEHCER.SetFocus
    Else
        cboEHCCD.Visible = True
        cboEHCCD.SetFocus
    End If
End If
End Sub

Private Sub txtEHCER_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELITN.SetFocus
End Sub

Private Sub txtEHCNO_KeyPress(KeyAscii As Integer)
Dim Result As String
If KeyAscii = 13 Then
    Result = Find("RCM", "CMNME", "WHERE CMCNO='" & txtEHCNO & "'")
    If Result = "" Then
        cboEHCNO.Visible = True
        cboEHCNO.SetFocus
    Else
        cboEHCNO.Visible = False
        txtCMNME = Result
        txtEHSNO.SetFocus
    End If
End If
End Sub

Private Sub txtEHCPO_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtEHCCD.SetFocus
End Sub

Private Sub txtEHDTE_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtEHCNO.SetFocus
End Sub

Private Sub txtEHDUE_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtEHCPO.SetFocus
End Sub

Private Sub txtEHODN_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Result = Find("ECH", "EHODN", "WHERE EHODN='" & txtEHODN & "'")
    If Result = "" Then
       txtEHDTE.SetFocus
    Else
        MsgBox "Order Number is already exist"
        txtEHODN = Result
        NewTrans = False
        ISADDING = False
        ISEDITING = False
        WriteToScreen
        ButtonStatus
    End If
End If
End Sub

Private Sub txtEHSNO_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then
    Dim Result As String
    Result = Find("SMM", "MMNME", "WHERE MMSNO='" & txtEHSNO & "'")
    If Result = "" Then
        cboEHSNO.Visible = True
        cboEHSNO.SetFocus
    Else
        cboEHSNO.Visible = False
        txtMMNME = Result
        txtEHSTN.SetFocus
    End If
End If

End Sub

Private Sub txtEHSTA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtEHDUE.SetFocus
End Sub

Private Sub txtEHSTN_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtEHSTA.SetFocus
End Sub

Private Sub txtELAMT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELVAM.SetFocus
End Sub

Private Sub txtELBCA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELBVA.SetFocus
End Sub

Private Sub txtELBVA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELAMT.SetFocus
End Sub

Private Sub txtELITN_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Dim Result As String
    Result = Find("IIM", "IMITD", "WHERE IMITN='" & txtELITN & "'")
    If Result = "" Then
        cboELITN.Visible = True
        cboELITN.SetFocus
    Else
        txtELITD = Result
        cboELITN.Visible = False
        txtELQTY.SetFocus
    End If
   
End If
End Sub
Sub OpenFile()
Adodc1.ConnectionString = ConnectString
Adodc1.ConnectionTimeout = 10
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "Select * from RCM"
Adodc1.Refresh

Adodc2.ConnectionString = ConnectString
Adodc2.ConnectionTimeout = 10
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = "Select * from AVM"
Adodc2.Refresh

FieldDel = "IMRID"
DelStatus = "IZ"
SQL = "Select * from IIM where " & FieldDel & " <>'" & DelStatus & "' "
Adodc3.ConnectionString = ConnectString
Adodc3.ConnectionTimeout = 10
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = SQL
Adodc3.Refresh

Adodc4.ConnectionString = ConnectString
Adodc4.ConnectionTimeout = 10
Adodc4.CommandType = adCmdText
Adodc4.RecordSource = "Select ECL.*,ECH.* from ECL " & _
    " LEFT JOIN ECH ON ECL.ELODN=ECH.EHODN where ECH.EHODN ='" & txtEHODN & "' and ELSTT<>'7' ORDER BY ELOLN"
Adodc4.Refresh

Adodc5.ConnectionString = ConnectString
Adodc5.ConnectionTimeout = 10
Adodc5.CommandType = adCmdText
Adodc5.RecordSource = "Select * from CCM"
Adodc5.Refresh

Adodc6.ConnectionString = ConnectString
Adodc6.ConnectionTimeout = 10
Adodc6.CommandType = adCmdText
Adodc6.RecordSource = "Select * from ECH"
Adodc6.Refresh

Adodc7.ConnectionString = ConnectString
Adodc7.ConnectionTimeout = 10
Adodc7.CommandType = adCmdText
Adodc7.RecordSource = "Select * from SMM"
Adodc7.Refresh

' Create array from combobox Custtype,StatusOrder, ValuePer
INVType(1) = "1 Normal"
INVType(2) = "2 By pass Inventory"

StaOrd(1) = "1 New"
StaOrd(2) = "2 Printed"
StaOrd(3) = "3 Confirmed"
StaOrd(4) = "4 B/O"
StaOrd(5) = "5 Caredit hold"
StaOrd(6) = "6 Completed"
StaOrd(7) = "7 Canceled"
Per(1) = "Unt"
Per(2) = "Wgt"
Per(3) = "All"
End Sub

Sub ButtonStatus()
'cmdAddNew.Enabled = Not ISEDITING
'cmdReview.Enabled = Not ISEDITING
'cmdNewItem.Enabled = Not ISEDITING
'cmdEdit.Enabled = Not ISEDITING
'cmdSave.Enabled = ISEDITING
'cmdCancel.Enabled = ISEDITING
FrameBB.Enabled = ISEDITING 'NewTrans
FrameECLine.Enabled = ISEDITING
'txtEHODN.Locked = Not ISADDING
End Sub

Sub WriteToFile()
Dim recECL As Recordset
txtELLDT = Format(Now(), "yyyy-mm-dd hh:mm:ss")
If ISADDING Then
    If txtELITN <> "" Then
        Set recECL = DBconn.Execute("Select * from ECL where ELODN='" & txtEHODN & "' order by ELOLN Desc ")
        If recECL.EOF Then
            txtELOLN = 1
        Else
            txtELOLN = recECL!ELOLN + 1
        End If
        SQL = "Insert into ECL(ELODN,ELITN,ELITD,ELLUS" & _
        ",ELPER,ELOLN,ELSTT " & _
        ",ELQTY,ELWGT,ELPRC,ELPDC" & _
        ",ELAMT,ELVAM,ELBCA,ELBVA,ELVAT) values " & _
        "('" & txtEHODN & "','" & txtELITN & "','" & txtELITD & "','" & UserLogin & "'" & _
        ",'" & cboELPER.ListIndex + 1 & "','" & txtELOLN & "','1'" & _
        "," & txtELQTY & "," & txtELWGT & "," & txtELPRC & "," & txtELPDC & _
        "," & txtELAMT & "," & txtELVAM & "," & txtELBCA & "," & txtELBVA & "," & txtELVAT & ")"
        
        'MsgBox SQL
        DBconn.Execute (SQL)
        WriteToIIM txtELITN, Val(txtELWGT), Val(txtELQTY)
    End If
Else
    txtEHLDT = Format(Now(), "yyyy-mm-dd hh:mm:ss")
    txtEHDTE = Format(txtEHDTE, "yyyy-mm-dd hh:mm:ss")
    txtEHDUE = Format(txtEHDUE, "yyyy-mm-dd hh:mm:ss")
    If Left(cboEHSTT.List(cboEHSTT.ListIndex), 1) = "7" Then 'Cancel
        
        Set recECL = DBconn.Execute("Select * from ECL where ELODN='" & txtEHODN & "' AND ELSTT<>'7'")
        With recECL
            Do While Not recECL.EOF
                wgt = -(!ELWGT)
                Unt = -(!ELQTY)
                WriteToIIM !ELITN, wgt, Unt
                recECL.MoveNext
            Loop
        End With
        SQL = "Update ECL  set ELSTT='7' where ELODN='" & txtEHODN & "'"
        DBconn.Execute SQL
    Else
        Set recECL = DBconn.Execute("Select * from ECL where ELODN='" & txtEHODN & "' and ELOLN='" & txtELOLN & "'")
        With recECL
            If Left(cboELSTT.List(cboELSTT.ListIndex), 1) = "7" Then  'Cancel
                Unt = -(!ELQTY)
                wgt = -(!ELWGT)
            Else
                Unt = Val(txtELQTY) - !ELQTY
                wgt = Val(txtELWGT) - !ELWGT
            End If
        End With
        WriteToIIM txtELITN, wgt, Unt
    End If
    SQL = "Update ECL set ELLDT='" & txtELLDT & "',ELITN='" & txtELITN & "',ELITD='" & txtELITD & "',ELLUS='" & UserLogin & "'" & _
    ",ELPER='" & cboELPER.ListIndex + 1 & "',ELOLN='" & txtELOLN & "',ELSTT='" & cboELSTT.ListIndex + 1 & "'" & _
    ",ELQTY=" & txtELQTY & ",ELWGT=" & txtELWGT & ",ELPRC=" & txtELPRC & ",ELPDC=" & txtELPDC & _
    ",ELAMT=" & txtELAMT & ",ELVAM=" & txtELVAM & ",ELBCA=" & txtELBCA & ",ELBVA=" & txtELBVA & ",ELVAT=" & txtELBVA & _
    " where ELODN='" & OldEHODN & "' AND ELOLN='" & txtELOLN & "'"
    DBconn.Execute SQL
    
    
    SQL = "Update ECH set EHLDT='" & txtEHLDT & "',EHDTE='" & txtEHDTE & "',EHITP='" & cboEHITP.ListIndex + 1 & "'" & _
    ",EHODN='" & txtEHODN & "',EHCNO='" & txtEHCNO & "',EHSTN='" & txtEHSTN & "',EHPTC='" & txtEHPTC & "'" & _
    ",EHSTA='" & txtEHSTA & "',EHSNO='" & txtEHSNO & "',EHDUE='" & txtEHDUE & "',EHCPO='" & txtEHCPO & "'" & _
    ",EHCCD='" & txtEHCCD & "',EHCER=" & txtEHCER & " where EHODN='" & OldEHODN & "'"
    DBconn.Execute SQL
End If
Dim RecCountLine As Recordset
Set RecCountLine = DBconn.Execute("SELECT ELODN, COUNT(ELOLN) AS CountLine From ECL " & _
" WHERE (ELODN = '" & txtEHODN & "') AND (ELSTT <> N'7')GROUP BY ELODN")
txtEHNOL = RecCountLine!CountLine
RecCountLine.Close
If NewTrans Then
    txtEHLDT = Format(Now(), "yyyy-mm-dd hh:mm:ss")
    txtEHDTE = Format(WorkingDate, "yyyy-mm-dd hh:mm:ss")
    txtEHDUE = Format(txtEHDUE, "yyyy-mm-dd hh:mm:ss")
    
    SQL = "Insert into ECH (EHLDT,EHDTE,EHITP" & _
    ",EHODN,EHCNO,EHSTN,EHPTC" & _
    ",EHSTA,EHSNO,EHDUE,EHCPO" & _
    ",EHCCD,EHCER,EHNOL,EHSTT) values " & _
    "('" & txtEHLDT & "','" & txtEHDTE & "','" & cboEHITP.ListIndex + 1 & "'" & _
    ",'" & txtEHODN & "','" & txtEHCNO & "','" & txtEHSTN & "','" & txtEHPTC & "'" & _
    ",'" & txtEHSTA & "','" & txtEHSNO & "','" & txtEHDUE & "','" & txtEHCPO & "'" & _
    ",'" & txtEHCCD & "'," & txtEHCER & "," & txtEHNOL & ",'1')"
    MsgBox SQL
    DBconn.Execute (SQL)

End If

recECL.Close
Set recECL = DBconn.Execute("SELECT ELODN, SUM(ELVAM) AS SumELVAM, SUM(ELAMT)" & _
    " AS SumELAMT, SUM(ELBVA) AS SumELBVA, SUM(ELBCA) " & _
    " AS SumELBCA FROM ECL WHERE (ELODN = '" & txtEHODN & "') GROUP BY ELODN")
With recECL
    txtEHAMT = !SumELAMT
    txtEHVAM = !SumELVAM
    txtEHBAM = !SumELBCA
    txtEHBVA = !SumELBVA
End With
recECL.Close

DBconn.Execute ("UPDATE ECH SET EHAMT=" & txtEHAMT & ",EHVAM=" & txtEHVAM & ",EHBAM=" & txtEHBAM & ",EHBVA=" & txtEHBVA & " WHERE EHODN='" & txtEHODN & "'")

Adodc4.RecordSource = "Select ECL.*,ECH.* from ECL " & _
    " LEFT JOIN ECH ON ECL.ELODN=ECH.EHODN where ECH.EHODN ='" & txtEHODN & "' ORDER BY ELOLN"
Adodc4.Refresh

End Sub

Sub WriteToIIM(ITN, wgt, unit)

unit = IIf(IsNumeric(unit), unit, 0)
 wgt = IIf(IsNumeric(wgt), wgt, 0)
    

SQL = "UPDATE IIM SET IMOOW=IMOOW+" & wgt & ",IMOOU=IMOOU+" & unit & " WHERE IMITN='" & ITN & "'"
DBconn.Execute SQL

End Sub


Private Sub txtELPDC_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELVAT.SetFocus
End Sub

Private Sub txtELPRC_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then cboELPER.SetFocus
End Sub

Private Sub txtELQTY_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELWGT.SetFocus
End Sub

Private Sub txtELVAM_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then cmdSave.SetFocus
End Sub

Private Sub txtELVAT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELBCA.SetFocus
End Sub

Private Sub txtELWGT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtELPRC.SetFocus

End Sub
Sub tam()
If Left(cboEHSTT.List(cboEHSTT.ListIndex), 1) = "7" Then 'Cancel
        SQL = "Update ECL  set ELSTT='7' where ELODN='" & txtEHODN & "'"
        DBconn.Execute SQL
        
        Set recECL = DBconn.Execute("Select * from ECL where ELODN='" & txtEHODN & "'")
        With recECL
            Do While Not recECL.EOF
                wgt = -(!ELWGT)
                Unt = -(!ELQTY)
                WriteToIIM !ELITN, wgt, Unt
                recECL.MoveNext
            Loop
        End With
    Else
        Set recECL = DBconn.Execute("Select * from ECL where ELODN='" & txtEHODN & "' and ELOLN='" & txtELOLN & "'")
        With recECL
            If Left(cboELSTT.List(cboELSTT.ListIndex), 1) = "7" Then  'Cancel
                Unt = -(recECL!ELQTY)
                wgt = -(recECL!ELWGT)
            Else
                Unt = recECL!ELQTY - Val(txtELQTY)
                wgt = recECL!ELWGT - Val(txtELWGT)
            End If
        End With
        WriteToIIM txtELITN, wgt, Unt
    End If
End Sub
